﻿using System;
using System.Collections.Generic;
//using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace PPSignSDKDemoSharp
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class CalDlg : Window
    {
        public CalDlg()
        {
            InitializeComponent();
        }

        private void btnStart_Click(object sender, RoutedEventArgs e)
        {
            btnEnd.IsEnabled = true;
            ImportDll.PPL398_BeginCalibrate(ImportDll.DEVICE_TYPE_ID.PPL398_DEVICE);
            btnStart.IsEnabled = false;
        }

        private void btnEnd_Click(object sender, RoutedEventArgs e)
        {
            Int32 nRes = ImportDll.PPL398_EndCalibrate(ImportDll.DEVICE_TYPE_ID.PPL398_DEVICE,true);
            if(nRes ==0 )
                this.Close();
        }
    }
}
